package com.wicture.erp4android.utils;

import android.app.Activity;
import android.os.Handler;



public class EquitDelay {
	private Activity mActivity;
	
	public EquitDelay(Activity mActivity){
		this.mActivity = mActivity;
	}
private Handler handler = new Handler(){
	public void handleMessage(android.os.Message msg) {
		
		
	};
};
private Thread thread;
	
	public  void equit(){
		if(thread==null){
		 thread = new Thread(new Runnable() {
			
			@Override
			public void run() {
				System.out.println("计时开始");
				try {
					wait(4000);
				} catch (InterruptedException e) {
					// TODO Auto-generated catch block
					e.printStackTrace();
				}
				mActivity.finish();
				thread = null;
				
			}
		});
		}
		thread.start();
	}
	public void stopEquit(){
		if(thread!=null&&thread.isAlive()){
			thread.stop();
		}
	}
}
